//
//  InvitationBaoJiaTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/10.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "InvitationBaoJiaTableViewCell.h"


@implementation InvitationBaoJiaTableViewCell{
    GLGWLabel * storeNameLabel;
    GLGWLabel * baojiaNumLabel;
    GLGWLabel * dellNumLabel;
    GLGWLabel * chenJiaoLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        [bankgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(10));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(10));
        }];
        //
        storeNameLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(10), KScreenWidth - kWidthProportion_In_iPhoneTriploid(60), kHeightProportion_In_iPhoneTriploid(30)) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        storeNameLabel.text = @"小张店铺";
        //
        baojiaNumLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(storeNameLabel.x, kY_With_View(storeNameLabel, 10), storeNameLabel.width, kHeightProportion_In_iPhoneTriploid(17)) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        baojiaNumLabel.text = @"近一个月报价次数";
        //
        dellNumLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(baojiaNumLabel.x, kY_With_View(baojiaNumLabel, 5), KScreenWidth - kWidthProportion_In_iPhoneTriploid(140), baojiaNumLabel.height) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        dellNumLabel.text = @"累计报价成交次数";
        //
        chenJiaoLabel= [[GLGWLabel alloc] initWithFrame:CGRectMake(dellNumLabel.x, kY_With_View(dellNumLabel, 5), dellNumLabel.width, dellNumLabel.height) theFont:SYSTEMFONT(12) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        chenJiaoLabel.text = @"总成交率";
        //
        GLGWButton * invitileBut = [[GLGWButton alloc] initWithTitle:@"邀请报价" titleLableFont:SYSTEMFONT(12) titleLableColor:[UIColor whiteColor] theCornerRadius:3.0 backgroundColr:kColor_Rule_Yellow inSuperView:bankgroundView];
        [invitileBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.bottom.equalTo(bankgroundView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(15));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(60)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(25)));
        }];
        [invitileBut addTarget:self action:@selector(invitationAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

-(void)invitationAction{
    if (self.Block_InviateAction) {
        self.Block_InviateAction();
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
